﻿//-----------------------------------------------------------------------
// <copyright file="ITimer.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>29/03/2013</date>
//-----------------------------------------------------------------------
using System;

namespace ConsoleHoster.Common.Utilities.Threading
{
	/// <summary>
	/// Represents a contract for a timer that is integrated into the System.Windows.Threading.Dispatcher queue
	/// which is processed at a specified interval of time and at a specified priority.
	/// </summary>
	public interface ITimer : IDisposable
	{
		/// <summary>
		/// Occurs when the timer interval has elapsed.
		/// </summary>
		event EventHandler Tick;

		/// <summary>
		/// Gets or sets the period of time between timer ticks.
		/// </summary>
		TimeSpan Interval { get; set; }

		void Start();

		void Stop();
	}
}
